package mutsumimod.cards.deprecated;

import basemod.AutoAdd;
import com.badlogic.gdx.graphics.Color;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.BufferPower;
import mutsumimod.cards.BaseCard;
import mutsumimod.character.Mutsumi;
import mutsumimod.monitors.BrokenMonitor;
import mutsumimod.util.CardStats;

@Deprecated
@AutoAdd.Ignore
public class Broken extends BaseCard {
    public static final String ID = makeID(Broken.class.getSimpleName());
    public static final CardStats info = new CardStats(
            Mutsumi.Meta.CARD_COLOR,
            CardType.SKILL,
            CardRarity.UNCOMMON,
            CardTarget.SELF,
            1
    );

    public Broken() {
        super(ID, info);
        setAttr(0,0,1);
        setAttrUpg(0,0,0);
        exhaust=true;
    }

    @Override
    public void triggerOnGlowCheck() {
        if(BrokenMonitor.isGetDebuffThisTurn){
            glowColor= Color.GOLD.cpy();
        }else{
            super.triggerOnGlowCheck();
        }
    }

    @Override
    public boolean canUse(AbstractPlayer p,AbstractMonster m){
        if(!BrokenMonitor.isGetDebuffThisTurn){
            return false;
        }
        return super.canUse(p,m);
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        if(BrokenMonitor.isGetDebuffThisTurn){
            applyPowerSelf(new BufferPower(p, magicNumber));
        }
    }

    @Override
    public void updateDescription() {
        if(upgraded){
            this.rawDescription=cardStrings.UPGRADE_DESCRIPTION;
        }else{
            this.rawDescription=cardStrings.DESCRIPTION;
        }
        initializeDescription();
    }

    @Override
    public void upgrade() {
        if(!upgraded){
            upgradeName();
            exhaust=false;
            updateDescription();
        }
    }

    @Override
    public AbstractCard makeCopy() { //Optional
        return new Broken();
    }



}
